< previous page page_370 next page >

Page 370
Using Move to Navigate Recordsets
The Move methods offer the most basic form of record searching. There are four methods you can apply to the Recordset object:
·MoveFirst: This method moves the record pointer to the first record in the dataset. This method is the same as clicking the double-headed arrow on the left side of the data control.
·MovePrevious: This method moves the record pointer to the record just before the current record. This method is the same as clicking the single-headed arrow on the left side of the data control.
·MoveNext: This method moves the record pointer to the record just after the current record. This method is the same as clicking the single-headed arrow on the right side of the data control.
·MoveLast: This method moves the record pointer directly to the last record in the dataset. This method is the same as clicking the double-headed arrow on the right side of the data control.
To practice using these methods, start a new Visual Basic project. Save the form as FRMMOVE.FRM and the project as PRJMOVE.VBP. Table 10.1 contains a list of controls to add to the form. Refer to Figure 10.1 as a guide as you lay out the form.
0370-01.jpg
Figure 10.1.
Laying out the frmMove form.
Table 10.1. Controls for project PRJMOVE.VBP.
ControlPropertySetting
VB.FormNamefrmMove
Caption''MS Jet Move Methods"
ClientHeight1470
ClientLeft60
ClientTop345
ClientWidth5400

(table continued on next page)

 
< previous page page_370 next page >

If you like this book, buy it!